<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/pages/common/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>广东工业大学招生办-院系介绍</title>
	<link rel="stylesheet" type="text/css" href="${ctx}/css/reset.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/css/common.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/css/home.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/css/page.css" />
	<script type="text/javascript" src="${ctx}/js/showTime.js"></script>
	<script type="text/javascript" src="${ctx}/js/jquery.min.js"></script>
	<script type="text/javascript" src="${ctx}/js/jquery.tab.js"></script>
	<script type="text/javascript" src="${ctx}/js/academy-list.js"></script>
	<script type="text/javascript" src="${ctx}/js/a.js"></script>
	<script src="${ctx }/js/jquery.js" type="text/javascript"></script>
	<script src="${ctx}/js/page.js" type="text/javascript"></script>
	
	</head>
		<script language="javascript" >
	$(document).ready(function(){
			$.post("${ctx}/base/major!visitorCount.action", "id=${entity.id}" ,function callback(text){
             		$("#visitor").text(text);
             	});
				
	});
	</script>
	<script language="javascript">
	 function check(){
		var newacademy=document.getElementById("academy");
		var newmajor=document.getElementById("major");
		if(newacademy.value!=""&& newmajor.value!=""){
			return true;
		}
		else if(newacademy.value==""){
			alter("学院不能为空");
			return false;
		}else {
			alter("专业不能为空");
			return false;
		}
		
	 }
	</script>
	<script type="text/javascript">
	function changeselect1(id){
		$.getJSON("${ctx}/base/major!majorlist.action", {academyId:id}, function(json){
				var options="<option value=''>请选择专业</option>";
           		for(var i=0; i<json.length; i++){
           			options+="<option value="+json[i].id+">"+json[i].name+"</option>";
           		}
           		$("#major").html(options);
     	});
	}
function checkName(){
	var title=document.majform.academyId.value;
	var major=document.majform.id.value;
	if(title==""){
	alert("学院名称不能为空！");
		return false;
		}
		if(major==""){
			alert("专业不能为空！");
			return false;
		}
		return  true;
	}
</script>
</head>		
<body>

	<div class="wrapper">
		<jsp:include page="../../../header.jsp" flush="true" /> 
		<!--main-content--> 
			<!--Breadcrumb Trail--> 
		<div style="width:960px;margin:0px auto;">您的位置：<a href="${ctx}/index.html">网站首页</a>-学院专业 </div>
			<div id="main-content-child-page" class="w960 auto">
			<div class="content clearfix">
			    <div class="f16 pt10 pb10 ml20 mr20 mb20 tc tip"><a class="red">温馨提示：</a>点击所属院系名称可查看相应学院简介</div>				
				<div class="academy-analogy-pic2"><span class="white f18 rel">广东工业大学本科生专业介绍</span></div>
					
				<div class="professtion-detail-menu l">
					<div class="bluebg white f16 pt5 tc" style="margin-top:50px;">所属院系</div>
					<div class="bluebg white f16 pt5 tc">专业名称</div>
					<div class="bluebg white f16 pt5 tc">专业介绍</div>
					<div class="bottom">
					</div>
					<div style="margin-top:20px;">				
					   <form action="${ctx}/base/major!byKeyword.action" method="post" onsubmit="return checkName()" name="majform">
					   <table>
					     <tr><td style="height:30px;">专属院系：</td>
					     <td style="height:30px;">
					   <select id="academy" name="academyId" onchange="changeselect1(this.value)" style="width:120px;">
				  
				  <!-- <select name="academyId" id="first" onchange="select()"> -->										
					<option  value="" selected="selected">请选择学院</option>
				<s:iterator value="academyList" >
					<option value="<s:property value='id'/>">${name}</option>	
		        </s:iterator>	
		    	</select>			  
					     </td></tr>
					     <tr>
					      <td style="height:30px;">专业名称：</td>
					      <td style="height:30px;">
					<select name="id" id="major" style="width:120px;"></select>
					      </td>
					     </tr>
					     <tr>
					      <td colspan="2" align="right">
					      <input class="academy-analogy_buttom academy-analogy_buttom_add" type="submit" value="确定"/>
					      <input class="academy-analogy_buttom academy-analogy_buttom_add" type="reset" value="重置"/></td>
					     </tr>
					   </table>
					</form>
					</div>
				</div>
				 <div style="margin-left:300px;">阅读人数：<span id="visitor" ></span></div>
				<div class="professtion-detail r mr20 pr20" style="margin-top:30px;">
				   
					<h1 class="professtion-detail-add f20 tc"><a href="${ctx}/base/academy!input.action?id=${entity.academy.id}" title="${entity.academy.name}"> ${entity.academy.name}</a></h1>
					<h2 class="professtion-detail-add f16 tc mt5">${entity.name}</h2>
					<div class="professtion-detail-add">
					 <div style="margin-left:400px;">更新时间:${entity.inputTime}</div>
					<p> ${entity.introduce }</p>
    			</div>
    			</div>
			</div>
		</div>
		<jsp:include page="../../../footer.jsp" flush="true" /> 
	</div>	
	</body>
</html>